<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/scripts/jquery/jquery-1.7.1.js"></script>
<link href="/style/authority/basic_layout.css" rel="stylesheet" type="text/css">
<link href="/style/authority/common_style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/scripts/authority/commonAll.js"></script>
<script type="text/javascript" src="/scripts/fancybox/jquery.fancybox-1.3.4.js"></script>
<script type="text/javascript" src="/scripts/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<link rel="stylesheet" type="text/css" href="/style/authority/jquery.fancybox-1.3.4.css" media="screen"></link>
<script type="text/javascript" src="/scripts/artDialog/artDialog.js?skin=default"></script>
<title>信息管理系统</title>
<script type="text/javascript">
	$(document).ready(function(){
		/** 新增   **/
	    $("#addBtn").fancybox({
	    	'href'  : '/resume/-1',
	    	'width' : 450,
	        'height' : 300,
	        'type' : 'iframe',
	        'hideOnOverlayClick' : false,
	        'showCloseButton' : false,
	        'onClosed' : function() {
				window.location.reload()
	        }
	    });

		
	    /**编辑   **/
	    $("a.edit").fancybox({
	    	'width' : 450,
	        'height' : 300,
	        'type' : 'iframe',
	        'hideOnOverlayClick' : false,
	        'showCloseButton' : false,
	        'onClosed' : function() {
				window.location.reload()
	        }
	    });
	});

	/** 新增   **/
	function add(){
		$("#submitForm").attr("action", "/resume/-1").submit();
	}
	
	/** 删除 **/
	function del(id){
		// 非空判断
		if(id == '') return;
		if(confirm("您确定要删除吗？")){
			$.ajax({
				type:"DELETE",
				url:"/resume/" + id,
				dataType : "text",
				success:function(data){
					$.ajax({
						type:"GET",
						url:"/resume/queryAll",
						success:function(data){
							window.location.reload()
						}
					});
				}
			});
		}
	}

	/** 编辑 **/
	function edit(id){
		console.log("===========>" + id)
		// 非空判断
		if(id == '') return;
		$.ajax({
			type:"GET",
			url:"/resume/" + id,
			dataType : "text",
			success:function(data){

			}
		});
	}


	/** 普通跳转 **/
	function jumpNormalPage(page){
		$("#submitForm").attr("action", "house_list.html?page=" + page).submit();
	}
	
	/** 输入页跳转 **/
	function jumpInputPage(totalPage){
		// 如果“跳转页数”不为空
		if($("#jumpNumTxt").val() != ''){
			var pageNum = parseInt($("#jumpNumTxt").val());
			// 如果跳转页数在不合理范围内，则置为1
			if(pageNum<1 | pageNum>totalPage){
				art.dialog({icon:'error', title:'友情提示', drag:false, resize:false, content:'请输入合适的页数，\n自动为您跳到首页', ok:true,});
				pageNum = 1;
			}
			$("#submitForm").attr("action", "house_list.html?page=" + pageNum).submit();
		}else{
			// “跳转页数”为空
			art.dialog({icon:'error', title:'友情提示', drag:false, resize:false, content:'请输入合适的页数，\n自动为您跳到首页', ok:true,});
			$("#submitForm").attr("action", "house_list.html?page=" + 1).submit();
		}
	}
</script>
<style>
	.alt td{ background:black !important;}
</style>
</head>
<body>
	<form id="submitForm" name="submitForm" action="" method="post">
		<input type="hidden" name="allIDCheck" value="" id="allIDCheck"/>
		<input type="hidden" name="fangyuanEntity.fyXqName" value="" id="fyXqName"/>
		<div id="container">
			<div class="ui_content">
				<div class="ui_text_indent">
					<div id="box_border">
						<div id="box_bottom">
							<input type="button" value="新增" class="ui_input_btn01" id="addBtn" />
						</div>
					</div>
				</div>
			</div>
			<div class="ui_content">
				<div class="ui_tb">
					<table class="table" cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
						<tr>
							<th width="30"><input type="checkbox" id="all" onclick="selectOrClearAllCheckbox(this);" />
							</th>
							<th>姓名</th>
							<th>地址</th>
							<th>手机号码</th>
							<th>操作</th>
						</tr>
						<c:forEach var="resume" items="${resume_list}">
						<tr>
								<td><input type="checkbox" name="IDCheck" value="14458579642011" class="acb" /></td>
								<td><c:out value="${resume.name}"/></td>
								<td><c:out value="${resume.address}"/></td>
								<td><c:out value="${resume.phone}"/></td>
								<td>
									<a href="/resume/${resume.id}" class="edit">编辑</a>
									<a href="javascript:del('${resume.id}');">删除</a>
								</td>
							</tr>
					</c:forEach>

					</table>
				</div>
				<div class="ui_tb_h30">
					<div class="ui_flt" style="height: 30px; line-height: 30px;">
						共有
						<span class="ui_txt_bold04">90</span>
						条记录，当前第
						<span class="ui_txt_bold04">1
						/
						9</span>
						页
					</div>
					<div class="ui_frt">
						<!--    如果是第一页，则只显示下一页、尾页 -->
						
							<input type="button" value="首页" class="ui_input_btn01" />
							<input type="button" value="上一页" class="ui_input_btn01" />
							<input type="button" value="下一页" class="ui_input_btn01" />
							<input type="button" value="尾页" class="ui_input_btn01" />
						
						
						
						<!--     如果是最后一页，则只显示首页、上一页 -->
						
						转到第<input type="text" id="jumpNumTxt" class="ui_input_txt01" />页
							 <input type="button" class="ui_input_btn01" value="跳转"" />
					</div>
				</div>
			</div>
		</div>
	</form>
<div style="display:none"><script src='http://v7.cnzz.com/stat.php?id=155540&web_id=155540' language='JavaScript' charset='gb2312'></script></div>
</body>
</html>
